const path = require("path");
module.exports = {
  mode: "development",
  entry: "./src/index.js",
  output: {
    path: path.resolve("dist"),
    filename: "main.js",
  },
  module: {
    rules:[
        {
            test:/\.js$/,
            use:{
                loader:'babel-loader',
                options:{
                   plugins:[//babel插件
                     [
                       path.resolve(__dirname,'plugins/babel-plugin-import.js'),
                       {
                         library:'lodash'
                       }
                     ]
                   ]
                }
            }
        }
    ]
  },
  plugins:[
    // webpack插件
  ]
};